
			//给元素元素添加事件
//function addEvent(elements,e,fn){
//				//firefox使用addEventListener.来添加事件
//				if(elements.addEventListener){
//					elements.addEventListener(e,fn,false);
//				}
//				//ie使用attchEvent.来添加事件
//				else{
//					elements.attchEvent("on"+e,fn);
//				}
//			}
//			window.onload=function(){
//				var elements = document.getElementById("btn");
//				addEvent(elements,"click",test1);
//				addEvent(elements,"click",test2);
//			}
//			
//返回顶部
window.onload=function(){
	var obj = document.getElementById("jw-backtop");
	var headernav = document.getElementById("jw-header");
			var scrollTop = 0;
			obj.onclick = function() {
					var timer = setInterval(function() {
						window.scrollBy(0, -100);
						if(scrollTop == 0) {
							clearInterval(timer);
						}
					}, 20);
					event.stopPropagation();
				}				
			window.onscroll = function() {
				event.stopPropagation()
				scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;				
				if(scrollTop >= 100) {
					obj.style.display = "block";
				} else {
					obj.style.display = "none";
				}

			}
}
	
//二级菜单
$(document).ready(function(){

	$(".jw-artile-mun-list").hover(function(){
		
		i=0;
		i = $(this).index();
		$(".smbmun").eq(i).fadeIn();
		$('.jw-artile-mun-list').eq(i).css("background-color","white").siblings().toggleClass({"background-color":"#f1f1f1"});	
	},function(){
	$('.jw-artile-mun-list').eq(i).css("background-color","#f1f1f1").siblings().toggleClass({"background-color":"#f1f1f1"});	
	$(".smbmun").eq(i).fadeOut();
		
	})
})
	//登录注册	
	var webSubnav= document.getElementById('web-subnav-inner');
	var faBars = document.getElementById('fa-bars');
	var faTimes = document.getElementById('fa-times');
	function websubnav(){
		faTimes.style.display="block";
		faBars.style.display="none";
		webSubnav.style.display="block";
		event.stopPropagation()
	}
	function websubnavhidn(){
		faTimes.style.display="none";
		faBars.style.display="block";
		webSubnav.style.display="none";
		event.stopPropagation()
	}
	var showlogoin = document.getElementById('jw-login-wrapper');
				var hiddlogin = document.getElementById("colse-login");
				var registered = document.getElementById("jwRegisteredInner");
				var hiddregistered = document.getElementById("colse-registered");

				function login() {
					showlogoin.style.display = "block";
				}

				function registereds() {
					registered.style.display = "block";

				}

				function hiddlogins() {
					showlogoin.style.display = "none";

				}

				function hiddregistereds() {
					registered.style.display = "none";

				}
				var toggets = document.getElementById("toggetregistered");
				function toggetregistered() {
					showlogoin .style.display = "none";
					registered .style.display = "block";
				}
				$(function(){					
					$('#toggetregistered').click(function() {
							$('.jw-login-body').css('transform', ' rotateY(360deg)');
							$('.jw-login-body').css('transition', ' 2s');
						})
				})
			
				
				var toggetslogin = document.getElementById("toggetlogin");

				function toggetlogins() {
					showlogoin.style.display = "block";
					registered.style.display = "none";
				}
				$('.colse-login').hover(function(){
					$(this).rotate({animateTo: 360});
				})

